package org.blankie.util;

import org.blankie.lang.Validate;

public enum ComponentState {

    CREATED, INITIALIZED, STARTED, STOPPED, DESTROYED;

    public boolean after(ComponentState state) {
        Validate.parameterNotNull("state", state);
        return compareTo(state) > 0;
    }

    public boolean before(ComponentState state) {
        Validate.parameterNotNull("state", state);
        return compareTo(state) < 0;
    }

}
